/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Issam
 */
@Embeddable
public class PortefeuilleActionPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "NUM_ACTION", nullable = false)
    private long numAction;
    @Basic(optional = false)
    @Column(name = "NUM_PORT", nullable = false)
    private int numPort;

    public PortefeuilleActionPK() {
    }

    public PortefeuilleActionPK(long numAction, int numPort) {
        this.numAction = numAction;
        this.numPort = numPort;
    }

    public long getNumAction() {
        return numAction;
    }

    public void setNumAction(long numAction) {
        this.numAction = numAction;
    }

    public int getNumPort() {
        return numPort;
    }

    public void setNumPort(int numPort) {
        this.numPort = numPort;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) numAction;
        hash += (int) numPort;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PortefeuilleActionPK)) {
            return false;
        }
        PortefeuilleActionPK other = (PortefeuilleActionPK) object;
        if (this.numAction != other.numAction) {
            return false;
        }
        if (this.numPort != other.numPort) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "test.entities.PortefeuilleActionPK[ numAction=" + numAction + ", numPort=" + numPort + " ]";
    }
    
}
